#ifndef PROFILE_H
#define PROFILE_H

#include <QObject>
#include <QSettings>

class Profile : public QObject
{
    Q_OBJECT
public:
    explicit Profile(QObject *parent = 0);
    ~Profile();

    //void                SetSettingsManager(QSettings *set);
    QStringList        *GetInfoFromFile(unsigned char key[16]);
static    QStringList  *GetInfoDecrypted(unsigned char key[16], QByteArray &encrypted_arr);
    //QStringList        &GetInfoFromMemory();
    //void               SetParamList(QStringList &list);
virtual void           SaveParamsFromList(QStringList &params)=0;
virtual QStringList &  GetParamList()=0;

    void               SaveToFile(QString file_name, unsigned char *key);
    void               LoadFromFile(QString file_name, unsigned char *key);
    bool               SetParameters(QStringList &params, unsigned char key[16]);

//virtual bool          operator==(Profile & other) const=0;
//virtual Profile&      operator=(Profile & other)=0;
signals:

public slots:

protected:
virtual    QString*    StringFromParameters()=0;
    int                parameters_size;
    QString            m_file_name;
    QString            settings_key;
private:

static     void        GetStr(unsigned char *key,
                       unsigned char *in_str,
                       unsigned char *out_str,
                       unsigned int lenght);
           void        SetStr(unsigned char *key,
                       unsigned char *in_str,
                       unsigned char *out_str,
                       unsigned int lenght);

};

#endif // PROFILE_H
